Skip to content

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 25, 2019

Replace the condition as suggested in the comment, the referenced test
failures do not seem to happen anymore.

Replace the condition as suggested in the comment, the referenced test
failures do not seem to happen anymore.
@smarter smarter requested a review from odersky June 25, 2019 21:50
else {
val effectiveOwner =
if (curOwner.isTerm && defDenot.symbol.isType)
if (curOwner.isTerm && defDenot.symbol.maybeOwner.isType)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following alternative check passes all tests too:

Suggested change
if (curOwner.isTerm && defDenot.symbol.maybeOwner.isType)
if (curOwner.isConstructor)

This looks more obviously correct to me, wdyt @odersky ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think curOwner could also be localDummy. maybeOwner.isType looks correct.

else {
val effectiveOwner =
if (curOwner.isTerm && defDenot.symbol.isType)
if (curOwner.isTerm && defDenot.symbol.maybeOwner.isType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think curOwner could also be localDummy. maybeOwner.isType looks correct.

@odersky odersky merged commit d871d1f into scala:master Jun 26, 2019
@Blaisorblade Blaisorblade deleted the fix-i5636 branch June 26, 2019 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants